package com.sunthy.mall.dao.admin;

import com.sunthy.mall.model.admin.bo.reply.ReplyBo;
import com.sunthy.mall.model.admin.pojo.reply.Reply;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 对留言的增删改查的接口
 * @Author: XM
 */
public interface ReplyDao {
    /**
     * 根据state查询对应reply
     *
     * @param state
     * @return List<Reply>
     */
    List<Reply> selReplyByState(Integer state);

    /**
     * 根据replyBo 修改reply
     *
     * @param replyBo
     */
    void updateReply(@Param("replyBo") ReplyBo replyBo);

    /**
     * 根据goodsId获取所有reply
     *
     * @param id goodsId
     * @return List<Reply>
     */
    List<Reply> selReplyByGoodsId(Integer id);

    /**
     * 添加一条留言
     *
     * @param reply
     * @return int
     */
    int addAskGoodsMsg(@Param("reply") Reply reply);
}
